/*
 * @(#)CodingUTF8.java Time: 2013-1-31
 *
 * Copyright 2013 xuedou.com All rights reserved.
 */

package xuedou.skymoni.util;

import java.io.UnsupportedEncodingException;

import org.apache.log4j.Logger;


/**
 *<pre>类说明</pre>
 *<b>功能描述：</b>
 * 编码转换
 * @author  meiguanghui meiguanghui@xuedou.com
 * @version 1.0, 2013-1-31
 */
public class Encoding {
	
	/**
	 * 编码转换
	 * @param str 需要被转码的字符串
	 * @return 被转码过后的字符串
	 */
	public static String codeUTF8(String str) {
		try {
			str = new String(str.getBytes("ISO-8859-1"),"UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return str;
	}
	
	
}
